<template>
    <div class="layout">
        <div class="main">
          <p class="title">欢迎使用舍艺房产云</p>
          <p><a class="deal-search" @click="toDeal" href="javascript:;"><img src="../assets/img/ico-deal.png" alt=""></a><span>成交查询</span></p>
          <p><a class="listing-search" @click="toListing" href="javascript:;"><img src="../assets/img/ico-listing.png" alt=""></a><span>挂牌查询</span></p>
        </div>
        <p class="footer">©2017 上海家后信息科技有限公司</p>
    </div>
</template>
<script>
  import { FCY_KEY, zoneListPath } from '../assets/js/config'
  import cache from '../assets/js/cache'
  export default {
    name: 'index',
    data () {
      return {}
    },
    created () {
      let token = cache.get(FCY_KEY)
      if (token === null) {
        this.$router.push({ path: '/' })
      } else {
        let getZoneListOption = {
          url: zoneListPath,
          sendData: {level: 3, token},
          success (data) {
          }
        }
        this.post(getZoneListOption)
      }
    },
    methods: {
      toDeal () {
        this.$router.push({ path: '/deal' })
      },
      toListing () {
        this.$router.push({ path: '/listing' })
      }
    }
  }
</script>
<style scoped>
  .layout {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    background: url("../assets/img/indebg.png") center center no-repeat;
    background-size: 100% 100%;
    -webkit-background-size: 100% 100%;
    overflow: hidden;
    position: relative;
  }
  .main {
    width: 90%;
    padding-bottom: 1.8rem;
    background: url("../assets/img/hangbg.png") center center no-repeat;
    -webkit-background-size: cover;
    background-size: cover;
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    -o-transform: translate(-50%,-50%);
    transform: translate(-50%,-50%);
  }
  .main > p {
    padding-top: .8rem;
  }
  .main > .title {
    height: 1rem;
    line-height: 1rem;
    padding-top: .96rem;
    font-size: .48rem;
    text-align: center;
    color: #404040;
  }
  .main > p > a {
    height: 2rem;
    width: 2rem;
    line-height: 2rem;
    border-radius: .1rem;
    margin: 0 auto;
    display: block;
    font-size: .4rem;
    text-align: center;
    color: #fff;
  }
  .main > p > span {
    display: block;
    margin: .3rem auto 0;
    text-align: center;
    color: #555;
    font-size: .32rem;
  }
  .footer {
    position: absolute;
    width: 100%;
    left:0;
    bottom:5%;
    text-align: center;
    color: #fff;
  }
</style>
